<div class="home_box">
    <div class="header">
      <div class="logo">
        <img src="@/assets/02.jpg" alt="">
      </div>
      <div class="title">
        何首乌·专业防脱发
      </div>
      <el-button class="logout" type="info">退出</el-button>
    </div>
    <div class="home">
      <div class="slide">
        <el-menu
          default-active="2"
          :unique-opened="true"
          class="el-menu-vertical-demo">
          <el-submenu v-for="item in menuList" :index="item.id + ''" :key="item.id" >
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>{{item.authName}}</span>
            </template>
            <el-menu-item-group>
              <el-menu-item v-for="each in item.children" :index="each.id + ''" :key="each.id">
                <i class="el-icon-menu"></i>
                <router-link :to="'/' + each.path" tag="span">{{each.authName}}</router-link>
              </el-menu-item>
            </el-menu-item-group> 
          </el-submenu>

          <!-- <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>权限管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="2-1">
                <i class="el-icon-menu"></i>
                <router-link to="/roles" tag="span">角色列表</router-link>
              </el-menu-item>
              <el-menu-item index="2-2">
                <i class="el-icon-menu"></i>
                <router-link to="/rights" tag="span">权限列表</router-link>
              </el-menu-item>
            </el-menu-item-group> 
          </el-submenu>

          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>商品管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="3-1">
                <i class="el-icon-menu"></i>
                <router-link to="/goods" tag="span">商品列表</router-link>
              </el-menu-item>
              <el-menu-item index="3-2">
                <i class="el-icon-menu"></i>
                <router-link to="/params" tag="span">商品参数</router-link>
              </el-menu-item>
              <el-menu-item index="3-3">
                <i class="el-icon-menu"></i>
                <router-link to="/category" tag="span">商品分类</router-link>
              </el-menu-item>
            </el-menu-item-group> 
          </el-submenu>

          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>订单管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="4-1">
                <i class="el-icon-menu"></i>
                <router-link to="/orders" tag="span">订单列表</router-link>
              </el-menu-item>
            </el-menu-item-group> 
          </el-submenu>

          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>数据统计</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="5-1">
                <i class="el-icon-menu"></i>
                <router-link to="/reports" tag="span">数据报表</router-link>
              </el-menu-item>
            </el-menu-item-group> 
          </el-submenu> -->
        </el-menu>
      </div>
      <div class="content">
        <router-view></router-view>
      </div>
    </div>
  </div>